<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$lang->main->send?> - <?=$lang->common->taiyi?></title>
<link href="/css/<?=$l?>/common.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/css/<?=$l?>/home.css" />

<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/raphael.js"></script>
<script type="text/javascript" src="/js/index.js"></script>
<script type="text/javascript" src="/js/jquery.boxy.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<link rel="stylesheet" type="text/css" href="/css/<?=$l?>/boxy.css" />
</head>

<body>
<?php include PATH_TPL . '/'. LANG ."/header.tpl.phtml" ?>
<div id="main">
	<?php include PATH_TPL . '/'. LANG ."/wallet/wallet.header.tpl.phtml" ?>	
		
	<!-- 发送开始 -->
	<div class="my_wallet my_add clearfix">
		<h2 class="Font18 left"><?=$lang->main->send?></h2>
	</div>
	<div class="wallet wallet_tabel clearfix">
		<form id='sendform'  onkeydown="if(event.keyCode==13)return false;">
			<ul class="coin_money">
				<li><label><?=$lang->wallet->send_to?></label><input type="text" class="left" name='address'  value='<?=$pAddress?>'/><a href="/wallet/sendaddress?wallet=<?=$tWallet?>" class="add left"><?=$lang->wallet->choose_from_address_book?></a></li>
				<li style='padding-top:5px;height:20px;line-height:20px;'><label>&nbsp;</label><?if($tWallet == 'ybcoin'){?><span class="Font14 tishi" style='width:800px'><?=$lang->wallet->message1?></span><?}?></li>
				<li><label><?=$lang->common->label?></label><input type="text" name='account' value='<?=$pAccount?>' /></li>
				<li><label><?=$lang->common->amount?></label><input type="text" name='amount' value='<?=$pAmount?>' />
<!--					<select>
						<option>BTC</option>
						<option>YBC</option>
						<option>CNY</option>
						<option>USD</option>
					</select>-->
				</li>
				<?php if(empty($tPasswallet)){?><li><label><?=$lang->setting_page->wallet_password?></label><input type="password" name='password' /></li><?}?>
				<li><label>&nbsp;</label><input type="button" name='sent' class="btn_sub" value="<?=$lang->wallet->confirm_to_send?>" /></li>
			</ul>
		</form>
	</div>
	<!-- 发送结束 -->
</div>
<?php include PATH_TPL . '/'. LANG ."/wallet/wallet.footer.tpl.phtml" ?>
<?php include PATH_TPL . '/'. LANG ."/footer.tpl.phtml" ?>
</body>
</html>
<script>
$(function(){
	<?if(!is_array($tWalletinfo)){?>
		js_alert('您尚未添加货币，请添加货币后重试！' , '/walletadd');
	<?}?>
	$('input[name="sent"]').click(function(){
		var data = $('#sendform').serialize();                                    
		$(this).after('<img src="/images/loading02.gif">');
		$('.btn_sub').attr('disabled','true');
		$.post('/wallet/sendtoaddress?wallet=<?=$tWallet?>&sent=1', data ,function(obj){                                                          
			var obj = eval('('+obj+')');
			if(obj.status == 1){
				js_alert(obj.msg , '/wallet/listtransactions?wallet=<?=$tWallet?>');
			}else{
				js_alert(obj.msg);
				$('.btn_sub').next('img').remove();
			}
			$('.btn_sub').removeAttr('disabled');
		});  

	});		
})
</script>
